package org.jeecg.modules.lab.chart.controller;


import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.lab.chart.service.ChartAnlsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @Description: 图形报表统计
 * @Author: jeecg-boot
 * @Date: 2025-02-24
 * @Version: V1.0
 */
@Api(tags = "图形报表统计")
@RestController
@RequestMapping("/labchart/chartAnls")
@Slf4j
public class ChartAnlsController {


    @Autowired
    private ChartAnlsService chartAnlsService;

    @ApiOperation(value = "图形报表统计-科研实验统计", notes = "图形报表统计-科研实验统计")
    @GetMapping("/kyXmAnalyseData")
    public Result kyXmAnalyseData(@RequestParam(name = "year") String year) {

//        LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//        String userId = loginUser.getId();
        Map<String, Object> map = chartAnlsService.kyXmAnalyseData(null, year);
        return Result.ok(map);
    }

}
